package cn.domob.android.ads;

import android.content.Context;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
import android.webkit.WebSettings;
import java.net.URI;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.apache.http.NameValuePair;
import org.apache.http.client.utils.URLEncodedUtils;

class ac extends c
{
  public static final int f = 100;
  public static final int g = 101;
  public static final int h = 102;
  private static J i = new J(ac.class.getSimpleName());
  a e;
  private V j;
  private final k k;
  private c l;
  private x.b m;

  ac(Context paramContext, b paramb, d paramd, k paramk)
  {
    super(paramContext, 0);
    this.k = paramk;
    a(paramb, paramd);
  }

  public ac(Context paramContext, b paramb)
  {
    this(paramContext, b.a, d.c, k.a);
    this.c = paramb;
  }

  private void a(b paramb, d paramd)
  {
    setScrollContainer(false);
    setBackgroundColor(0);
    setVerticalScrollBarEnabled(false);
    setHorizontalScrollBarEnabled(false);
    setOnTouchListener(new View.OnTouchListener()
    {
      public boolean onTouch(View paramView, MotionEvent paramMotionEvent)
      {
        switch (paramMotionEvent.getAction())
        {
        default:
        case 0:
        case 1:
        }
        while (true)
        {
          return false;
          if (paramView.hasFocus())
            continue;
          paramView.requestFocus();
        }
      }
    });
    getSettings().setJavaScriptEnabled(true);
    this.j = new V(this, paramb, paramd);
    this.l = new c();
  }

  protected String a(String paramString, String[] paramArrayOfString)
  {
    return super.a(paramString, new String[] { "domob.js", "mraid.js" });
  }

  protected void a(Z paramZ)
  {
    String str = "{" + paramZ.toString() + "}";
    a("window.mraidbridge.fireChangeEvent(" + str + ");");
    i.b("Fire change: " + str);
  }

  protected void a(a parama)
  {
    this.e = parama;
  }

  protected void a(e parame)
  {
    c.a(this.l, parame);
  }

  protected void a(f paramf)
  {
    c.a(this.l, paramf);
  }

  protected void a(g paramg)
  {
    c.a(this.l, paramg);
  }

  protected void a(h paramh)
  {
    c.a(this.l, paramh);
  }

  protected void a(i parami)
  {
    c.a(this.l, parami);
  }

  protected void a(j paramj)
  {
    c.a(this.l, paramj);
  }

  protected void a(x.b paramb)
  {
    this.m = paramb;
  }

  protected void a(ArrayList<Z> paramArrayList)
  {
    String str1 = paramArrayList.toString();
    if (str1.length() < 2)
      return;
    String str2 = "{" + str1.substring(1, -1 + str1.length()) + "}";
    a("window.mraidbridge.fireChangeEvent(" + str2 + ");");
    i.b("Fire changes: " + str2);
  }

  protected boolean a(URI paramURI)
  {
    String str = paramURI.getHost();
    i.a("Command type is:" + str);
    List localList = URLEncodedUtils.parse(paramURI, "UTF-8");
    HashMap localHashMap = new HashMap();
    Iterator localIterator = localList.iterator();
    while (localIterator.hasNext())
    {
      NameValuePair localNameValuePair = (NameValuePair)localIterator.next();
      localHashMap.put(localNameValuePair.getName(), localNameValuePair.getValue());
    }
    L localL = P.a(str, localHashMap, this);
    if (localL == null)
    {
      b(str);
      return false;
    }
    localL.a();
    b(str);
    return true;
  }

  protected void b(String paramString)
  {
    a("window.mraidbridge.nativeCallComplete('" + paramString + "');");
  }

  protected void b(String paramString1, String paramString2)
  {
    a("window.mraidbridge.fireErrorEvent('" + paramString1 + "', '" + paramString2 + "');");
  }

  protected V c()
  {
    return this.j;
  }

  protected g d()
  {
    return c.a(this.l);
  }

  public void destroy()
  {
    this.j.a();
    super.destroy();
  }

  protected f e()
  {
    return c.b(this.l);
  }

  protected j f()
  {
    return c.c(this.l);
  }

  protected h g()
  {
    return c.d(this.l);
  }

  protected e h()
  {
    return c.e(this.l);
  }

  protected i i()
  {
    return c.f(this.l);
  }

  protected a j()
  {
    return this.e;
  }

  protected x.b k()
  {
    return this.m;
  }

  protected void l()
  {
    this.j.b();
    a(Y.a(this.k));
    m();
    if (f() == null)
      return;
    f().a(this);
  }

  protected void m()
  {
    a("window.mraidbridge.fireReadyEvent();");
  }

  static abstract interface a
  {
    public abstract void a();

    public abstract void b();
  }

  static enum b
  {
    static
    {
      b[] arrayOfb = new b[2];
      arrayOfb[0] = a;
      arrayOfb[1] = b;
      c = arrayOfb;
    }
  }

  static class c
  {
    private ac.g a;
    private ac.f b;
    private ac.j c;
    private ac.h d;
    private ac.e e;
    private ac.i f;
  }

  static enum d
  {
    static
    {
      d[] arrayOfd = new d[3];
      arrayOfd[0] = a;
      arrayOfd[1] = b;
      arrayOfd[2] = c;
      d = arrayOfd;
    }
  }

  public static abstract interface e
  {
    public abstract void a(ac paramac, boolean paramBoolean);
  }

  public static abstract interface f
  {
    public abstract void a(ac paramac, ac.l paraml);
  }

  public static abstract interface g
  {
    public abstract void a(ac paramac);
  }

  public static abstract interface h
  {
    public abstract void a(ac paramac);
  }

  public static abstract interface i
  {
    public abstract void a(ac paramac);
  }

  public static abstract interface j
  {
    public abstract void a(ac paramac);
  }

  static enum k
  {
    static
    {
      k[] arrayOfk = new k[2];
      arrayOfk[0] = a;
      arrayOfk[1] = b;
      c = arrayOfk;
    }
  }

  public static enum l
  {
    static
    {
      l[] arrayOfl = new l[4];
      arrayOfl[0] = a;
      arrayOfl[1] = b;
      arrayOfl[2] = c;
      arrayOfl[3] = d;
      e = arrayOfl;
    }
  }
}

/* Location:           C:\Users\god\Desktop\liunianjishiben_V1.1_mumayi_3745b_dex2jar.jar
 * Qualified Name:     cn.domob.android.ads.ac
 * JD-Core Version:    0.5.4
 */